package golf;

import java.sql.Date;
import java.sql.ResultSet;
import java.sql.SQLException;

public class Account {
	private String id;
	private String jumin;
	private String name;
	private String password;
	private int Ps_no;
	private Date ps_buy_date;

	public Account(){}
	/*
	 * ID
		JUMIN
		NAME
		PASSWORD
		PSNO
		PSBUYDATE
	 */
	public Account(ResultSet rs ){
		try {
			setId(rs.getString("ID"));
			setPassword(rs.getString("PASSWORD"));
			setName(rs.getString("NAME"));
			setJumin(rs.getString("JUMIN"));
			setPs_no(rs.getInt("PSNO"));
			setPs_buy_date(rs.getDate("PSBUYDATE"));
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			System.out.println("Account 객체 초기화 도중 에러 발생!");
			e.printStackTrace();
		}
		
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getJumin() {
		return jumin;
	}
	public void setJumin(String jumin) {
		this.jumin = jumin;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public int getPs_no() {
		return Ps_no;
	}
	public void setPs_no(int Ps_no) {
		this.Ps_no = Ps_no;
	}
	public Date getPs_buy_date() {
		return ps_buy_date;
	}
	public void setPs_buy_date(Date ps_buy_date) {
		this.ps_buy_date = ps_buy_date;
	}
}
